//
//  SLWorkInSelectVC.m
//  SlockApp
//
//  Created by 凯朱 on 2024/7/30.
//

#import "SLWorkInSelectVC.h"
#import "SLWorkInConnectVC.h"
@interface SLWorkInSelectVC ()

@end

@implementation SLWorkInSelectVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setUpSubViews];
}

-(void)setUpSubViews{
    self.title = kLocalString(@"Works with");
    _bgView.layer.cornerRadius = 20;
    _bgView.layer.masksToBounds = YES;
    _listLbl1.text = kLocalString(@"Amazon Alexa");
    _listLbl2.text = kLocalString(@"Apple HomeKit");
    _listLbl3.text = kLocalString(@"Google Home");
    _listLbl4.text = kLocalString(@"IFTTT");
    
    kWeakSelf(self);
    _listView1.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        [weakself selectPlatform:1];
    }];
    [_listView1 addGestureRecognizer:tap1];
    
    _listView2.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        [weakself selectPlatform:2];
    }];
    [_listView2 addGestureRecognizer:tap2];
    
    _listView3.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap3 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        [weakself selectPlatform:3];
    }];
    [_listView3 addGestureRecognizer:tap3];
    
    _listView4.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap4 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        [weakself selectPlatform:4];
    }];
    [_listView4 addGestureRecognizer:tap4];
    
   
}

-(void)selectPlatform:(NSInteger)index{
    SLWorkInConnectVC *vc = [[SLWorkInConnectVC alloc] init];
    vc.title = kLocalString(@"Amazon Alexa");
    [self.navigationController pushViewController:vc animated:YES];
}

@end
